<template>
	<div id="app">
		<router-view></router-view>
		<navbar v-if="show"></navbar>
	</div>
</template>

<script>
	import navbar from '@/components/navBar.vue'
	export default {
		name: 'app',
		components: {
			navbar
		},
		data() {
			return {
				show: true
			}
		},
		watch: {
			$route: function() {
				this.getroute()
			}
		},
		mounted() {
			this.getroute()
		},
		methods:{
			getroute(){
				let name = this.$route.name;
				let that = this;
				switch (name) {
					case "home":
						that.show = true;
						break;
					case "station":
						that.show = true;
						break;
					case "ask":
						that.show = true;
						break;
					case "user":
						that.show = true;
						break;
					default:
						that.show = false;
				}
			}
			
		}
	}
</script>

<style>
	#app {
		font-family: "Avenir", Helvetica, Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		/* text-align: center; */
		color: #2c3e50;
		/* margin-top: 2.08rem; */
		margin-bottom: 70px;
		background: #F7F7F7;
		font-size: 16px;
	}

	body {
		background: rgb(247, 247, 247, 1);
	}

	ul,
	li,
	p {
		margin: 0;
		padding: 0;
	}

	* {
		box-sizing: border-box;
	}

	html {
		line-height: initial !important;
	}

	html {
		font-size: 16px !important;
	}

	@media only screen and (min-width: 320px) {
		html {
			font-size: 12.36714px !important;
		}
	}

	@media only screen and (min-width: 350px) {
		html {
			font-size: 13.52657px !important;
		}
	}

	@media only screen and (min-width: 375px) {
		html {
			font-size: 14.4927px !important;
		}
	}

	@media only screen and (min-width: 400px) {
		html {
			font-size: 15.4589372px !important;
		}
	}

	@media only screen and (min-width: 414px) {
		html {
			font-size: 16px !important;
		}
	}

	@media only screen and (min-width: 430px) {
		html {
			font-size: 16.618px !important;
		}
	}

	@media only screen and (min-width: 450px) {
		html {
			font-size: 17.3913px !important;
		}
	}

	@media only screen and (min-width: 480px) {
		html {
			font-size: 18.5507px !important;
		}
	}

	/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
	html {
		font-family: sans-serif;
		-ms-text-size-adjust: 100%;
		-webkit-text-size-adjust: 100%;
	}
</style>
